/* eslint-disable */
// const SYSTEM_CONFIG = JSON.parse(process.env.VUE_APP_SYSTEM_CONFIG)
const app = {
  state: {
    appTitle:"查询统计",
    // 设备
    device: "desktop",
    // 侧边栏状态
    sidebar: {
      opened: false,
      withoutAnimation: false
    },
    isOpenAside: true
  },
  mutations: {
    TOGGLE_SIDEBAR: state => {
      state.sidebar.opened = !state.sidebar.opened;
    },
    TOGGLE_DEVICE: (state, device) => {
      state.device = device;
    },
    CLOSE_SIDEBAR: (state, withoutAnimation) => {
      state.isOpenAside = false;
      state.sidebar.withoutAnimation = withoutAnimation;
    }
  },
  actions: {
    toggleSidebar({ commit }) {
      commit("TOGGLE_SIDEBAR");
    },
    toggleDevice({ commit }, device) {
      commit("TOGGLE_DEVICE", device);
    },
    closeSideBar({ commit }, { withoutAnimation }) {
      commit("CLOSE_SIDEBAR", withoutAnimation);
    }
  }
};

export default app
